<extend name="public@base"/>
<block name="main">
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:url('AdminTag/index')}">标签管理</a></li>
            <li><a href="{:url('AdminTag/add')}">添加标签</a></li>
        </ul>
        <form method="post" class="js-ajax-form margin-top-20">
            <div class="table-actions">
                <!--<button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>-->
            </div>
            <table class="table table-hover table-bordered table-list">
                <thead>
                <tr>
                    <th width="50">ID</th>
                    <th>标签名称</th>
                    <th>状态</th>
                    <th width="160">操作</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="tags" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}</td>
                        <td>{$arrStatus[$vo['status']]}</td>
                        <td>
                            <if condition="$vo['status'] eq 1">
                                <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
                                   href="{:url('AdminTag/upStatus',['id'=>$vo['id'],'status'=>0])}">禁用</a>
                                <else/>
                                <a class="btn btn-xs btn-success js-ajax-dialog-btn"
                                   href="{:url('AdminTag/upStatus',['id'=>$vo['id'] ,'status'=>1])}">启用</a>
                            </if>
                            <a class="btn btn-xs btn-danger js-ajax-delete"
                               href="{:url('AdminTag/delete',['id'=>$vo['id']])}">删除</a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
                <tfoot>
                <tr>
                    <th width="50">ID</th>
                    <th>标签名称</th>
                    <th>状态</th>
                    <th width="160">操作</th>
                </tr>
                </tfoot>
            </table>
            <div class="table-actions">
                <!--<button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>-->
            </div>
        </form>
        <ul class="pagination">{$page|default=''}</ul>
    </div>
</block>